package com.xuanyuanxinyu.core.bus;

import androidx.annotation.NonNull;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.Observer;

/**
 * CM
* @FileName:
* @Description:
* @author ken.luo
* @date 2023/4/4
* @version V1.0
* @email 424533553@qq.com
*/
public interface Observable<T> {

    void post(T value);

    void postDelay(T value, long delay);

    void postDelay(LifecycleOwner sender, T value, long delay);

    void postOrderly(T value);

    void observe(@NonNull LifecycleOwner owner, @NonNull Observer<T> observer);

    void observeSticky(@NonNull LifecycleOwner owner, @NonNull Observer<T> observer);

    void observeForever(@NonNull Observer<T> observer);

    void observeStickyForever(@NonNull Observer<T> observer);

    void removeObserver(@NonNull Observer<T> observer);

}
